package com.liushuo.controller;

import com.liushuo.entity.Question;
import com.liushuo.dao.QuestionDao;
import com.liushuo.service.QuestionService;

import javax.script.ScriptException;
import java.util.List;

public class QuestionController {
    private final QuestionService questionService = new QuestionService();

    public List<Question> generateQuestions(int totalQuestions, int questionsWithParentheses, int gradeLevel) throws ScriptException {
        return questionService.generateQuestions(totalQuestions, questionsWithParentheses, gradeLevel);
    }

    public List<Question> getQuestionsByIds(List<Integer> ids) {
        return questionService.getQuestionsByIds(ids);
    }


}
